<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String ct = request.getParameter("ct") == null ? "0" : request.getParameter("ct");  
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>角色管理</title>
	<link rel="stylesheet" type="text/css" href="../easyui/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="../easyui/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="../css/main-page.css" />
	<script type="text/javascript" src="../easyui/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="../easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../js/win.js"></script>
	<script type="text/javascript">
	function initArticleTypeCombo(){
		$('#at').combobox({
		    url:'../articleType/initArticleTypeCombo.do?ct=0',
		    panelHeight: 'auto',
		    onSelect:function(record){
		    	$("#dg").datagrid("options").queryParams = {'ct':record.value};
		    	$("#dg").datagrid("reload");
		    },
		    onLoadSuccess : function(){
		    	$("#at").combobox('select', <%=ct%>);
		    }
		});
	}
	
	$(function(){
		initArticleTypeCombo();
	});
	</script>
</head>
<body>
	<div class="dg-search">
		<select class="easyui-combobox" id="at" style="width: 150px">
		</select>
	</div>
	<div class="dg-content">
		<table id="dg" class="easyui-datagrid" title="文章列表"
			data-options="rownumbers:true,pagination:true,
				fitColumns:true,iconCls:'icon-table',url:'../article/findAllArticle.do'">
			<thead>
				<tr>
					<th data-options="field:'ck',checkbox:true"></th>
					<th data-options="field:'id',hidden:true"></th>
					<th data-options="field:'title',width:120,align:'left'">标题</th>
					<th data-options="field:'author',width:40,align:'center'">作者</th>
					<th data-options="field:'date',width:40,align:'center'">日期</th>
					<th data-options="field:'type',width:40,align:'center'">类型</th>
				</tr>
			</thead>
		</table>
	</div>
</body>
</html>